package cn.zn.modules.pz.his.controller;

import cn.zn.framework.common.utils.Result;
import cn.zn.modules.pz.his.entity.vo.PzMoneyVO;
import cn.zn.modules.pz.his.service.PzMoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("pz/his/pzmoney")
public class PzMoneyController {

    @Autowired
    private PzMoneyService pzMoneyService;

    @GetMapping("list/{ap}/{mainId}")
    public Result list(@PathVariable Integer ap, @PathVariable String mainId) {
        List<PzMoneyVO> pzMoneyList = pzMoneyService.findByMainId(ap, mainId);
        return Result.ok(pzMoneyList);
    }

}
